package com.objectdraw.server.commands;

import com.objectdraw.server.data.RequestData;
import com.objectdraw.server.data.ResponseData;

/**
 * Interface used to handle processing requests from the client
 * 
 * @author Harrison
 * 
 */
public abstract class Command {

	protected Command successor;

	/**
	 * Define who the next processor of the request is.
	 * @param successor
	 */
	public void setSuccessor(Command successor) {
		this.successor = successor;
	}

	/**
	 * Action method for processing a request.
	 * @param request
	 * @param response
	 */
	abstract public void processRequest(RequestData request,
										ResponseData response);
}
